Updated

A subway train that derailed on Tuesday in New York City injuring 34 people was caused by an “improperly secured piece of replacement rail” that was stored on the track, transit officials said.

“Storing equipment in between tracks is a common practice employed by railroads across the country to accelerate rail repairs,” the Metropolitan Transportation Authority (MTA) said in a statement. “The key to this being an effective and safe practice is making sure that the extra equipment if properly bolted down, which does not appear to have happened in this case.”

NYC SUBWAY DERAILMENT INJURES AT LEAST 34

The MTA said crews have been inspecting “every inch of rail” to ensure that every replacement part is “properly stored and secured.”

Riders shared pictures and videos on social media of the incident. Pictures of the derailed train showed its metal side deeply scraped and dented from being dragged along the wall of the subway tunnel. Debris, including broken signaling equipment and chunks of concrete, were left in the train’s wake.

Passengers on the “A” train said it suddenly jerked and began shaking violently as it approached a station in Harlem.

mta2

New York City emergency personnel work at the scene of the subway derailment on Tuesday, June 27, 2017. (AP)

Sparks from the train briefly ignited garbage on the track, but there was no serious fire and the train stayed upright, said Joe Lhota, chairman of the MTA.

Passengers had to walk through darkened tunnels using their cellphone lights and exiting on the platform. Emergency crews shut off track power after derailments to prevent evacuees from being electrocuted.

MTA officials suspended service on the A, B, C and D trains during their investigation. The MTA reported service changes for Wednesday and said they are repairing the Harlem station where the derailment occurred.

Gov. Andrew Cuomo, D-N.Y., called the derailment an “unacceptable manifestation of the system’s current state.”

NYC SUBWAY STATION REOPENS AFTER SUPERSTORM SANDY FLOODING

“It is my expectation that with new leadership brought by Joe Lhota, the MTA will address the fundamental issues plaguing the transit system and overhaul the organizational structure of the MTA,” Cuomo continued.

The MTA has come under fire from riders over a growing number of major delays. In April, a power outage backed up trains around New York City and closed a key Manhattan station for 12 hours. The MTA reported that there were more than 60,000 delayed trains and nearly 25,000 late trains in January alone, The New York Times reported.

The MTA’s Long Island Railroad is also having trouble. A report released earlier this month found that rush-hour cancellations and delays on the railroad are at the highest level in ten years. The derailment comes less than two weeks before Amtrak's infrastructure project to update Penn Station is set to start which will likely result in delays and cancellations on the Long Island Railroad.

The Associated Press contributed to this report.